Repository navigation
fix(web): Keep background announcements quiet for held or stopped runs - #40585
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
EvidenceLinux Chromium web client, 1280×800, light theme, fresh synthetic data on both commits. Start an asynchronous subagent, open another thread, then complete the parent while its child remains running. The audit panel displays actual ARIA live-region writes; it is instrumentation, not product UI. Base writes “Done: Async review parent”; head stays quiet.
Scenario and embedded replay driver. scenarios:prove exited 0: failsOnBase=true, passesOnHead=true. Scope: proves the asynchronous-subagent case through actual live-region writes. Spoken screen-reader audio, monitor wakes, awaited commands, and the Stop race were not captured. Not shown:
|


Problem
When a background thread finishes a turn while awaited background work is still running, finishes a background-wake turn while a monitor is still active, or settles as completed after the user requested Stop, the web and desktop notification coordinator stays quiet, but the screen-reader background announcer still speaks "Done: ".
This happened because the background announcer passed the latest run status straight through to the live-region helper instead of applying the same completion gates the desktop/web notification coordinator uses.
Change
Added a status-resolution step for the background thread announcer so a completed run is treated as not yet announced when stop was requested for the latest run, when pending background work still holds completion (such as a running subagent or awaited command), or when an active monitor holds a background-wake completion. Unawaited background commands, non-wake monitor runs, and non-completed outcomes (
failed,interrupted,cancelled) keep their existing announcements.Scope
Fixes #40586
Verification
Found while auditing background completion alerts across web notification surfaces: the desktop notification coordinator suppressed completion for awaited background work, monitor-held wakes, and stop-requested runs, while the background screen-reader announcer still read out "Done" on those same snapshots.
Verified with focused unit tests in
apps/web/src/components/backgroundThreadAnnouncement.test.tscovering all three held/stopped completion cases plus unawaited and non-completed controls (confirmed the new regression test fails againstupstream/mainbefore the fix withexpected 'completed' to be nulland passes with the fix, 11/11 passing), and ranvp run check:changed upstream/main(format, lint, knip, typecheck, tests, React Compiler all passing). Also rebuilt and ran the desktop app with this change included; live screen-reader speech output (Orca / VoiceOver) was not manually audited. No screenshots are included because the announcer writes only to ansr-onlyaria-live="polite"region with no visual UI change.Sent by Mike's agent (Gemini 4 Neon in T3 Code, Antigravity harness)